package com.self.member.mapstruct;

import com.self.member.dto.UserDto;
import com.self.member.model.User;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @version v1.0
 * @ClassName: mapstruct
 * @Description:
 * @Author: Mac
 * @Date: 2022/6/19 13:43
 */
@Mapper(componentModel = "spring")
public interface UserDtoMapStruct {

    UserDtoMapStruct INSTANCE = Mappers.getMapper(UserDtoMapStruct.class);

    UserDto convert2Dto(User user);

    User convert2Entity(UserDto userDto);

    List<UserDto> convert2Dto(List<User> user);

    List<User> convert2Entity(List<UserDto> userDto);

}
